package cn.btks.commonserver.valid;

import cn.btks.commonserver.valid.impl.FloatValidImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by zhangjing on 2019-4-03.
 * 浮点型判断，输入前台传输的值为0.00，那么这里校验定为格式错误
 * 需要与TypeConversionHandler.class类配合使用
 */
@Target({ElementType.FIELD, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {FloatValidImpl.class})
public @interface FloatValid {

    String message() default "输入内容或格式错误";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
